package com.huilian.iotbox.admin.wap.controller;

import com.huilian.iotbox.admin.wap.service.BankUnionCodeService;
import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.dto.BankUnionCodeDto;
import com.huilian.iotbox.data.vo.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 谢洛涛
 * @date 2020/8/29 16:12
 */
@RestController
@RequestMapping("/api/bankUnionCode")
public class BankUnionCodeController extends UserInfoController {
    @Autowired
    private BankUnionCodeService bankUnionCodeService;
    /**
     * 根据条件搜索
     *
     * @param bankUnionCodeDto
     * @return
     */
    @GetMapping("/getBankUnionCodeBy")
    public ServerResponse getBankUnionCodeBy(BankUnionCodeDto bankUnionCodeDto, HttpServletRequest request) throws Exception {
        UserInfo userInfo = super.getLoginUserInfo(request);
        return bankUnionCodeService.getBankUnionCodeV2(bankUnionCodeDto);
    }
}
